import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class DeviceCheckService {
  constructor(public httpClient: HttpClient) {
  }

  // 获取待验收列表
  getWaitCheckList(body: any) {
    return this.httpClient.post('/supportMachine/list', body).toPromise();
  }

  // 获取已验收列表
  getCheckedList(body: any) {
    return this.httpClient.post('/supportMachine/acceptList', body).toPromise();
  }

  // 获取统计列表
  getStatisticsList(body: any) {
    return this.httpClient.post('/supportMachine/count', body).toPromise();
  }

  // 验收
  check(id: any) {
    return this.httpClient.post('/supportMachine/updateAcceptanceTime', {id}).toPromise();
  }

  // 获取设备详情
  getDeviceDetail(id: any) {
    return this.httpClient.post('/supportMachine/details', {id}).toPromise();
  }
}
